import React, { PureComponent } from "react";
import { RecommedWrapper, RecommedItem } from "../style";
import { connect } from "react-redux";

class Recomme extends PureComponent {
  render() {
    const { list } = this.props;
    return (
      <RecommedWrapper>
        {list.map(item => (
          <RecommedItem
            key={item.get("id")}
            imgUrl={item.get("imgUrl")}
          ></RecommedItem>
        ))}
      </RecommedWrapper>
    );
  }
}
const mapStateProps = state => ({
  list: state.getIn(["home", "recommendList"])
});

export default connect(mapStateProps, null)(Recomme);
